using System;
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;
using Random = UnityEngine.Random;

namespace SevenPieceGame
{
    public class UIPermanent : MonoBehaviour
    {
        private Text m_NoticeText;
        private void Awake()
        {
            OnCreate();
        }

        private void Start()
        {
            //MainManager.Instance.ShowNotiveStr();
        }

        private void OnCreate()
        {
            m_NoticeText = this.transform.Find("BlackBg/Text").GetComponent<Text>();
        }

        public void ShowNotice(string notice)
        {
            this.gameObject.SetActive(true);
            m_NoticeText.text = notice;
            m_NoticeText.GetComponent<RectTransform>().anchoredPosition = new Vector2(900, 0);
            m_NoticeText.transform.DOLocalMoveX(-800, 10f).SetEase(Ease.Linear).OnComplete(() =>
            {

            });
        }
    }
}


